package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 反馈回复实体
 */
@Data
@TableName("t_feedback_reply")
@Schema(description = "反馈回复表")
public class FeedbackReply implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "反馈ID")
    @TableField("feedback_id")
    @JsonProperty("feedbackId")
    private Long feedbackId;

    @Schema(description = "回复类型：1-平台回复，2-用户追加")
    @TableField("reply_type")
    @JsonProperty("replyType")
    private Integer replyType;

    @Schema(description = "回复人ID（平台管理员或用户）")
    @TableField("user_id")
    @JsonProperty("userId")
    private Long userId;

    @Schema(description = "回复内容")
    private String content;

    @Schema(description = "图片（JSON数组）")
    private String images;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
